package com.juzipi.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;


/*//服务消费方
@SpringBootApplication
//启用 Eureka 的客户端
@EnableDiscoveryClient
//开启熔断
@EnableCircuitBreaker*/

//组合注解，相当于@SpringBootApplication，@EnableDiscoveryClient，@EnableCircuitBreaker这三个注解
@SpringCloudApplication
//启用 feign 组件
@EnableFeignClients
public class ConsumerApplication {

	public static void main(String[] args) {
		SpringApplication.run(ConsumerApplication.class, args);
	}

	//feign 内部已经封装好了restTemplate ,所以就不需要了
	/*@Bean
	//开启 负载均衡
	@LoadBalanced
	public RestTemplate restTemplate(){
		return new RestTemplate();
	}*/

}
